#pragma once
#include <atlbase.h>
#include "action.h"
#include "list.h"

namespace FD
{
	namespace Primitive { struct Base; }

	namespace Action
	{
		class Create : public Base
		{
		public:
							Create(Position *pos, Primitive::Base *obj);
						   ~Create();

			virtual void	apply();
			virtual void	revert();

		private:
			typedef CAutoPtr<Primitive::Base> AutoPointer;

			AutoPointer		m_primitive;
			Position		m_position;
		};

		class Delete : public Base
		{
		public:
							Delete(Position *pos);
						   ~Delete();

			virtual void	apply();
			virtual void	revert();

		private:
			Position*		m_position;
		};
	}
}